// 云函数入口文件
const cloud = require('wx-server-sdk')
cloud.init()
const env = "fz-xiaochengxu-3ggm49cn525bedba";
const db = cloud.database({env});

// 云函数入口函数
exports.main = async (event, context) => {
    //获取数据库命令对象
    const _ = db.command;
    return await db.collection("comments")
      .where({
        id: _.eq(event.id)
      })
      .get();
}